#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Create by zhang
# Create on 2022/6/23 15:16
def bean2dict(bean) -> dict:
    """
    对象实例转换成迭代转换成字典类型
    """
    if not bean or not issubclass(object):
        return bean
    result_dict:dict = bean.__dict__
    for key, val in result_dict.items():
        result_dict[key] = bean2dict(val)
    return result_dict